#include<bits/stdc++.h>
using namespace std;
int f2(int x){
    if(x <= 2){
        return 1;
    }
    int m = 1;
    for(int i = 1;i<=x;i++){
        m = m*2;
    }
    return f2(x - 1) + 2*f2(x - 2) + x*x*(x % 2 == 0?1:-1) + m;
}
int f[7][8];
struct vfs{
    long long ra,rb;
    vfs(long long a = 0,long long b = 1){
        ra = a;
        rb = b;
        long long g = __gcd(a,b);
        ra /= g;
        rb /= g;
        if(rb < 0){
            rb = -rb;
            ra = -ra;
        }
    }
    friend vfs operator*(vfs va,vfs vb){
        return vfs(va.ra*vb.ra,va.rb*vb.rb);
    }
    friend vfs operator/(vfs va,vfs vb){
        return vfs(va.ra*vb.rb,va.rb*vb.ra);
    }
    friend vfs operator+(vfs va,vfs vb){
        return vfs(va.ra*vb.rb + vb.ra*va.rb,va.rb*vb.rb);
    }
    friend vfs operator-(vfs va,vfs vb){
        return vfs(va.ra*vb.rb - vb.ra*va.rb,va.rb*vb.rb);
    }
};
vfs f1[7][8];
int main(){
    int res1 = 1;
    for(int i = 1;i <= 6;i++){
        res1 = res1*2;
        int res = 1;
        for(int j = 1;j <= 4;j++){
            if(i % 2 == 0){
                f[i][j] = 1ll*res;
            }else{
                f[i][j] = -1ll*res;
            }
            res*=i;
        }
        f[i][5] = res1*i;
        f[i][6] = res1;
        f[i][7] = f2(i);
    }
    for(int i = 1;i<=6;i++){
        for(int j = 1;j<=7;j++){
            f1[i][j] = vfs(f[i][j],1);
        }
    }
    int p = 1;
    for(int i = 1;i<=6;i++){
        if(f1[p][i].ra == 0){
            for(int j = p + 1;j <= 6;j++){
                if(f1[j][i].ra >= 0){
                    for(int k = i;k <= 7;k++){
                        swap(f1[p][k],f1[j][k]);
                    }
                    break;
                }
            }
            if(f1[p][i].ra == 0){
                p++;
                continue;
            }
        }
        for(int j = p + 1;j <= 6;j++){
            if(f1[j][i].ra){
                vfs res = f1[j][i] / f1[p][i];
                for(int k = i;k <= 7;k++){
                    f1[j][k] = f1[j][k] - (f1[p][k]*res);
                }
            }
        }
        p++;
    }
    for(int i = 1;i<=6;i++){
        for(int j = 1;j <= 7;j++){   
            cout<<f1[i][j].ra<<'/'<<f1[i][j].rb<<' ';
        }
        cout<<'\n';
    }
    cout<<"--------------\n";
    for(int i = 2;i<=6;i++){
        for(int j = i - 1;j >= 1;j--){
            if(f1[j][i].ra){
                vfs res = f1[j][i] / f1[i][i];
                for(int k = i;k <= 7;k++){
                    f1[j][k] = f1[j][k] - f1[i][k]*res;
                }
            }
        }
    }
    for(int i = 1;i<=6;i++){
        for(int j = 1;j <= 7;j++){   
            cout<<f1[i][j].ra<<'/'<<f1[i][j].rb<<' ';
        }
        cout<<'\n';
    }
    cout<<"--------------------\n";
    for(int i = 1;i<=6;i++){
        vfs res = f1[i][7]/f1[i][i];
        cout<<res.ra<<'/'<<res.rb<<'\n';
    }
}